/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.examination.barbecue.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.TreeService;
import com.jeesite.modules.zx.examination.barbecue.entity.TexaminationBarbecue;
import com.jeesite.modules.zx.examination.barbecue.dao.TexaminationBarbecueDao;
import com.jeesite.modules.file.utils.FileUploadUtils;

/**
 * 理论考试表Service
 * @author zpp
 * @version 2020-01-19
 */
@Service
@Transactional(readOnly=true)
public class TexaminationBarbecueService extends TreeService<TexaminationBarbecueDao, TexaminationBarbecue> {
	
	/**
	 * 获取单条数据
	 * @param texaminationBarbecue
	 * @return
	 */
	@Override
	public TexaminationBarbecue get(TexaminationBarbecue texaminationBarbecue) {
		return super.get(texaminationBarbecue);
	}
	
	/**
	 * 查询列表数据
	 * @param texaminationBarbecue
	 * @return
	 */
	@Override
	public List<TexaminationBarbecue> findList(TexaminationBarbecue texaminationBarbecue) {
		return super.findList(texaminationBarbecue);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param texaminationBarbecue
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(TexaminationBarbecue texaminationBarbecue) {
		super.save(texaminationBarbecue);
		// 保存上传图片
		FileUploadUtils.saveFileUpload(texaminationBarbecue.getId(), "texaminationBarbecue_image");
		// 保存上传附件
		FileUploadUtils.saveFileUpload(texaminationBarbecue.getId(), "texaminationBarbecue_file");
	}
	
	/**
	 * 更新状态
	 * @param texaminationBarbecue
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(TexaminationBarbecue texaminationBarbecue) {
		super.updateStatus(texaminationBarbecue);
	}
	
	/**
	 * 删除数据
	 * @param texaminationBarbecue
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(TexaminationBarbecue texaminationBarbecue) {
		dao.phyDelete(texaminationBarbecue);
		System.out.println("kkkkkkkkkkkkkkkkkkkkdse");
	}
	
}